const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    historyApiFallback: true,
    allowedHosts: "all",
    proxy: {
      "/api": {
        target: "http://localhost:4000",
        pathRewrite: {
          // pathRewrite表示路径重写，key表示一个正则，value表示别名
          "^/api": "", // 即用 '/api'表示'http://localhost:3000/api'
        },
      },
    },
  },
  publicPath: "./",
});
